package com.study.结构型模式.组合模式;

public class Client {

    public static void main(String[] args) {

        //从大到小创建对象   学校
        OrganizationComponent university = new University("大庆师范", "普通二本");
        //创建学院
        College college1 = new College("音乐与舞蹈学院", "音乐与舞蹈学院");
        College college2 = new College("外国语学院", "外国语学院");
        //创建系
        Department department1 = new Department("声乐系", "声乐系");
        Department department2 = new Department("器乐系", "器乐系");
        Department department3 = new Department("舞蹈系", "舞蹈系");

        Department department4 = new Department("英语系", "英语系");
        Department department5 = new Department("日语系", "日语系");
        Department department6 = new Department("俄语系", "俄语系");

        university.add(college1);
        university.add(college2);
        college1.add(department1);
        college1.add(department2);
        college1.add(department3);
        college2.add(department4);
        college2.add(department5);
        college2.add(department6);

        university.print();

    }
}
